home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 1257 / userlock.cp_ / userlock.cp
Encoding:
Text File  |  1997-04-18  |  1.6 KB  |  73 lines

  1. /* EasyCODE(C++) V5.1 01.03.1995 14:30:31
  2. Library Management: Checking of User Lockout */
  3. /* EasyCODE O
  4. If=horizontal
  5. LevelNumbers=no
  6. LineNumbers=no
  7. ScreenFont=Arial,,100,9220,-13,0,400,0,0,0,0,0,0,3,2,1,34
  8. PrinterFont=Courier,,100,2,-42,0,400,0,0,0,0,0,0,2,1,2,49
  9. LastLevelId=3 */
  10.  
  11. /* EasyCODE ( 1
  12.    Checking of user lockout */
  13. #include "libdat.h"
  14. /* EasyCODE - */
  15. extern BOOL ClpBrdUsrLock;
  16. extern int iDebtLimit;
  17. extern user_item user[];
  18. extern int iFilUsr;
  19.  
  20. /* EasyCODE ( 3
  21.    UsrLock */
  22.  
  23. /* EasyCODE F */
  24. BOOL UsrLock(void)
  25.    {
  26.    char cSlip;
  27.    BOOL bOk;
  28.    if (user[iFilUsr].Debts > iDebtLimit)
  29.       {
  30.       cout << "Debt limit exceeded !!!" << endl;
  31.       do
  32.          {
  33.          cout << "Deposit slip (Y/N) ?";
  34.          cin >> cSlip;
  35.          if ((cSlip == 'Y') ||
  36.              (cSlip == 'y'))
  37.             {
  38.             ClpBrdUsrLock = FALSE;
  39.             /* EasyCODE - */
  40.             user[iFilUsr].Debts = 0;
  41.             /* EasyCODE - */
  42.             bOk = TRUE;
  43.             }
  44.          else
  45.             {
  46.             if ((cSlip == 'N') ||
  47.                 (cSlip == 'n'))
  48.                {
  49.                cout << "User lockout";
  50.                /* EasyCODE - */
  51.                ClpBrdUsrLock = TRUE;
  52.                /* EasyCODE - */
  53.                bOk = TRUE;
  54.                }
  55.             else
  56.                {
  57.                bOk = FALSE;
  58.                }
  59.             }
  60.          }
  61.       while (!bOk);
  62.       }
  63.    else
  64.       {
  65.       ClpBrdUsrLock = FALSE;
  66.       }
  67. /* EasyCODE < */
  68.    return(ClpBrdUsrLock);
  69. /* EasyCODE > */
  70.    }
  71. /* EasyCODE ) */
  72. /* EasyCODE ) */
  73.